package com.atguigu.gmall.pms.feign;

import com.atguigu.gmall.common.bean.PageParamVo;
import com.atguigu.gmall.common.bean.PageResultVo;
import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.pms.entity.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author liuxing
 * @create 2022-09-12 4:55
 */
public interface PmsFeign {

    @PostMapping("pms/spu/json")
    @ApiOperation("es分页查询")
    public ResponseVo<List<SpuEntity>> querySpuByESPage(@RequestBody PageParamVo paramVo);

    @GetMapping("pms/sku/spu/{spuId}")
    public ResponseVo<List<SkuEntity>> getSkuBySpuId(@PathVariable("spuId") Long spuId);

    @GetMapping("pms/brand/{id}")
    @ApiOperation("详情查询")
    public ResponseVo<BrandEntity> queryBrandById(@PathVariable("id") Long id);

    @GetMapping("pms/category/{id}")
    @ApiOperation("详情查询")
    public ResponseVo<CategoryEntity> queryCategoryById(@PathVariable("id") Long id);

    @GetMapping("pms/skuattrvalue/searchAttr/{skuId}")
    public ResponseVo<List<SkuAttrValueEntity>> getSearchAttrBySkuIdAndCId(@PathVariable("skuId") Long skuId,
                                                                           @RequestParam("cId") Long cId);

    @GetMapping("pms/spuattrvalue/searchAttr/{spuId}")
    public ResponseVo<List<SpuAttrValueEntity>> getSearchSpuAttrBySpuIdAndCId(@PathVariable("spuId") Long spuId,
                                                                              @RequestParam("cId") Long cId);

}
